Back to Poly

Vigenère Cipher

What is a Vigenère Cipher?

Vigenère cipher is a polyalphabetic substitution cipher that uses a keyword to encrypt text. It differs from simple ciphers by using multiple alphabets for encryption, making it stronger than simple substitution ciphers.

Vigenere

Key Rules for Vigenère Cipher:

   1. Use: E(x) = (x + k) mod 26 for Encryption
                D(x) = (x - k) mod 26 for Decryption
   2. Choose a keyword
   3. Repeat keyword to match message length

Encryption Process:

   • Write your message
   • Write keyword repeatedly above message
   • Use the En/De formula to add the letter number of the plain text in alphabetical order with the corresponding letter number in the key to get the new letter number

Example with keyword "KEY":

Message: "HELLO"
Keyword: "KEYEK" (Repeat Keyword above message)

Process:
     • H + K = R   (H → 7 + K → 10 = R → 17 )
     • E + E = I
     • L + Y = J
     • L + E = P
     • O + K = Y

Result: "HELLO" → "RIJPY"

Decryption uses same rules but with Decryption formula, D(x) = (x - k) mod 26.

Video for explanation